<?php
namespace BaseExt;

/**
 * PicUpload Class
 */
class AppCanPush {

    /**
     * @param $uid
     * @param $title
     * @param $body
     * @return mixed
     */
    function toUid($uid,$title,$body){
        $MyCurl = new MyCurl();
        $url = "http://newpush.appcan.cn/oauth/sendByUid";
        $url = "http://newpush.appcan.cn/oauth/send";

        $authtoken = "ac4c0de7-011d-dbd6-6cda-cf823ccfe34e";
        $email = "605499394@qq.com";
        $appId = "11678283";
        $platforms = 1;//1=安卓，0=苹果
        $userIdListStr = $uid;

        $data = array(
            "authtoken"    => $authtoken,
            "email"    => $email,
            "appId"    => $appId,
            "platforms"    => $platforms,
//            "userIdListStr"    => $userIdListStr,
            "title"    => $title,
            "body"    => json_encode($body),//json string
        );
        return $MyCurl->post($url,$data);
    }
}
